/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.SystemConfigMapper;
public class SystemConfig extends BaseAction
{
    @Autowired(required=false)
	private SystemConfigMapper mapper;
    /**
    菜单图标
    */
    
    public Map eRPMenuPicture() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_images=mapper.s_images(params);
        result.put("s_images", s_images);
        
        return result;
    }
    /**
    选择图标
    */
    
    public Map eRPMenuPictureChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_images=mapper.p_images(params,pagination);
        p_images.setPagedListInfo(pagination);
        result.put("p_images", p_images);
        
        
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        SQLMap s_menu_emt=s_menu.getExistfirst();
        result.put("s_menu", s_menu_emt);
        
        return result;
    }
    /**
    产品分类图标
    */
    
    public Map eRPProductClassPicture() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_images=mapper.s_images(params);
        result.put("s_images", s_images);
        
        return result;
    }
    /**
    选择产品分类图标
    */
    
    public Map eRPProductClassChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_images=mapper.p_images(params,pagination);
        p_images.setPagedListInfo(pagination);
        result.put("p_images", p_images);
        
        
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        SQLMap s_menu_emt=s_menu.getExistfirst();
        result.put("s_menu", s_menu_emt);
        
        return result;
    }
    /**
    管理文件
    */
    
    public Map filesMana() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    系统角色
    */
    
    public Map systemRole() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_role=mapper.s_role(params);
        result.put("s_role", s_role);
        
        return result;
    }
    /**
    时间日历
    */
    
    public Map calendar2() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_year=mapper.s_year(params);
        s_year.setSelectNone("年");
        result.put("s_year", s_year);
        
        
        SQLList<SQLMap> s_month=mapper.s_month(params);
        s_month.setSelectNone("月");
        result.put("s_month", s_month);
        
        
        Object thisdate =mapper.thisdate(params);
        result.put("thisdate", thisdate);
        
        
        Object CMID3 =mapper.CMID3(params);
        result.put("CMID3", CMID3);
        
        
        params.def("CMIDSEL1",SQL.getYear());
        Object CMIDSEL1 =mapper.CMIDSEL1(params);
        result.put("CMIDSEL1", CMIDSEL1);
        
        
        params.def("CMIDSEL2",SQL.getMonth());
        Object CMIDSEL2 =mapper.CMIDSEL2(params);
        result.put("CMIDSEL2", CMIDSEL2);
        
        
        Object role_id =mapper.role_id(params);
        result.put("role_id", role_id);
        
        
        SQLList<SQLMap> s_calendar=mapper.s_calendar(params);
        result.put("s_calendar", s_calendar);
        
        
        SQLList<SQLMap> s_im=mapper.s_im(params);
        SQLMap s_im_emt=s_im.getExistfirst();
        result.put("s_im", s_im_emt);
        
        return result;
    }
    /**
    时间统计图
    */
    
    public Map cartogramStation() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        s_firm = s_firm.buildTree(tb,tb.getPid());
        result.put("s_firm", s_firm);
        
        return result;
    }
    /**
    */
    
    public Map u_img() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_img(params);
        
        return result;
    }
    /**
    */
    
    public Map u_proimg() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_proimg(params);
        
        return result;
    }
    /**
    */
    
    public Map d_role() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_role(params);
        
        return result;
    }
    /**
    */
    
    public Map d_station() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_station(params);
        
        return result;
    }
}